Create Your First Functional Component in React JS – Beginner's Guide

Image
Create Your First Functional Component in React JS  1. Introduction When you start learning React JS, one of the first things you will come across is the concept of components. At first, components may seem like just another programming concept, but they are actually the foundation of almost every React application. Think about a website you use every day. It may have a header, navigation menu, login form, product section, and footer. Instead of writing all these elements together in one large file, React allows us to create separate parts and manage them independently. These separate parts are called components. In this tutorial, we are going to create our first functional component in React. We will start with a very simple example and gradually understand how components are created, exported, imported, and displayed on a webpage.  2. What Is a Functional Component in React?   A functional component is simply a JavaScript function that returns a user interface using JSX...

how to run php program

 How To Run A PHP Code In  XAMPP

how to run php program


How to Install XAMPP ?


 1]   Apachefriends developed XAMPP . 

2] XAMPP available for everyone free of cose,

 3] download XAMPP through the official website

     https://www.apachefriends.org/download.html

∴  completing the download of the  setup file, than installation process  "select components"             section , select all the required components.

 setup




  ∴ Next, Select the directory where you want the software to be installed.it is recommended that you 
      use default directory "c\xampp" and click on "next " to complete the installation.


How to Start a New PHP Program In XAMPP ?

1]  Before you run or start  writing any program in php ,you start Apache & MYSQL.

2] next starting both servers, you have to write a program in Notepad, visual studio code ...... etc.

3]  next writing it, save that file  Name  as "program.php".

4] Before copy that file program.php to c:/program Files/ XAMPP/htdocs.

5]  open the browser and type http://localhost.

6]  Now run your code in that browser. 

 How to Run  a PHP Code using XAMPP?

 1] Before running a php script, you must know anywhere to write it.  

2]  XAMPP directory, there exists a folder called "htdocs" This is Where all the programs for 
     The web pages will be stored.

3]   Now, run a PHP Script.

1]  Go to "C:\xampp\htdocs" and inside it, create a  folder. lets  call it  "demo" it's considered 
     good practice to create  a new folder for every project you work on. 


2] Inside the demo folder, create a new text file and name it "index.php" and write the following script.

  
<?php
echo " hi";
?>
<?+php
echo "<marquee>learn php language </marquee>" ;
?>


3] Now to see the script  output open the XAMPP  control panel  and start Apache to host the local 
   webserver, where our script will be running.




4] Now navigate to your browser and type in "localhost/demo/" in the address bar to view the 

∴  OUTPUT  :


∴ Congratulations with this  you have  created a PHP  file and also executed the          program Successfully.


1) Can we run PHP in XAMPP? 

Yes, you can run PHP  in xampp. First start the XAMPP Server create a program  you want to and  run  http://localhost.


2) How do I run my PHP file?

PHP  files are saved in c:/program  files/XAMPP/htdocs.
you have to open it. click on the program, and it will automatically run on localhost.

Comments

Popular posts from this blog

HTML Tag

CSS Text Color Explained with Syntax and HTML Examples

CSS Outline Offset Property with Practical Examples